]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Add a timestamp argument to _finish()
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 4 Dec 2012 18:45:52 +0000 (13:45 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 6 Dec 2012 17:25:37 +0000 (12:25 -0500)
And use it elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=689653

js/ui/altTab.js
js/ui/ctrlAltTab.js
js/ui/switcherPopup.js

index f8e0a44761ff62a7203d9b959407dffa0083e944..e8f460db22a0097a7fc35d3a0ea80691232ab9db 100644 (file)
@@ -261,7 +261,7 @@ const AppSwitcherPopup = new Lang.Class({
         this._select(this._selectedIndex, n);
     },
 
-    _finish : function() {
+    _finish : function(timestamp) {
         this.parent();
 
         let appIcon = this._items[this._selectedIndex];
@@ -270,7 +270,7 @@ const AppSwitcherPopup = new Lang.Class({
             window = appIcon.cachedWindows[this._currentWindow];
         else
             window = null;
-        appIcon.app.activate_window(window, global.get_current_time());
+        appIcon.app.activate_window(window, timestamp);
     },
 
     _onDestroy : function() {
index 14fba02b29ce6435aa688cc90dcc9939263a1093..7ed1e4db33c8873589f58f4a9aa51979d8256db0 100644 (file)
@@ -52,11 +52,11 @@ const CtrlAltTabManager = new Lang.Class({
         }
     },
 
-    focusGroup: function(item) {
+    focusGroup: function(item, timestamp) {
         if (item.window) {
-            Main.activateWindow(item.window);
+            Main.activateWindow(item.window, timestamp);
         } else if (item.focusCallback) {
-            item.focusCallback();
+            item.focusCallback(timestamp);
         } else {
             if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE ||
                 global.stage_input_mode == Shell.StageInputMode.NORMAL)
@@ -164,9 +164,9 @@ const CtrlAltTabPopup = new Lang.Class({
             this._select(this._next());
     },
 
-    _finish : function() {
-        this.parent();
-        Main.ctrlAltTabManager.focusGroup(this._items[this._selectedIndex]);
+    _finish : function(time) {
+        this.parent(time);
+        Main.ctrlAltTabManager.focusGroup(this._items[this._selectedIndex], time);
     },
 });
 
index ebb1628f6a806650e75cf4c6f5e4c857783fc2d9..b8ba0d2482dcc8bccfdd0c5f58bf806e3384d666 100644 (file)
@@ -151,7 +151,7 @@ const SwitcherPopup = new Lang.Class({
         // selection.)
         let [x, y, mods] = global.get_pointer();
         if (!(mods & this._modifierMask)) {
-            this._finish();
+            this._finish(global.get_current_time());
             return false;
         }
 
@@ -198,7 +198,7 @@ const SwitcherPopup = new Lang.Class({
         let state = mods & this._modifierMask;
 
         if (state == 0)
-            this._finish();
+            this._finish(event.get_time());
 
         return true;
     },
@@ -224,7 +224,7 @@ const SwitcherPopup = new Lang.Class({
 
     _itemActivated: function(switcher, n) {
         this._itemActivatedHandler(n);
-        this._finish();
+        this._finish(global.get_current_time());
     },
 
     _itemEnteredHandler: function(n) {
@@ -274,7 +274,7 @@ const SwitcherPopup = new Lang.Class({
             this.actor.destroy();
     },
 
-    _finish: function() {
+    _finish: function(timestamp) {
         this.destroy();
     },